<template>
  <ElCard v-bind="getElProps">
    <template #header v-if="!!widget.elProps.title">
      <div>
        <span>{{ widget.elProps.title }}</span>
      </div>
    </template>
    <RenderWidget :designer="designer" :widget="widget" :form-model="formModel"></RenderWidget>
  </ElCard>
</template>
<script setup lang="ts" name="CardWidget">
import { ElCard } from "element-plus";
import RenderWidget from "../../Layout/RenderWidget.vue";
import { computed } from "vue";
import { omit } from "lodash";
const props = defineProps({
  designer: {
    type: Object
  },
  widget: {
    type: Object
  },
  formModel: {
    type: Object
  }
});
const getElProps = computed(() => omit(props.widget!.elProps, ["title"]));
</script>
<style lang="scss" scoped></style>
